<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="./layui/css/layui.css">
    <link rel="stylesheet" href="style.css">
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">
    </script>
    <script src="./layui/layui.all.js"></script>  
    <title>管理后台</title>
</head>
<body class="layui-fluid" style="padding: 0px">
    <div id="header" class="layui-row">
        <div class="layui-col-md12">
            <ul class="layui-nav" lay-filter="top-nav">
                <li id="title">控制后台</li>
                <li class="layui-nav-item layui-this">订单管理</li>
                <li class="layui-nav-item">用户管理</li>
                <li class="layui-nav-item">商品管理</li>
                <li class="layui-nav-item">网站设置</li>
            </ul>
        </div>
    </div>
    <div id="side" class="layui-row">
        <ul class="layui-nav layui-nav-tree layui-nav-side" id="leftside" lay-filter="side">
            <li class="layui-nav-item"><a href="#">订单管理</a></li>
            <li class="layui-nav-item"><a href="#">用户管理</a></li>
            <li class="layui-nav-item"><a href="#">商品管理</a></li>
            <li class="layui-nav-item"><a href="#">网站设置</a></li>
        </ul>
    </div>
    <script>
        layui.use('element',function(){
            var element = layui.element;
            element.init();
        });
        $(window).resize(function(){
            changeSide();
        });
        $(window).load(function(){
            changeSide();
        });

        changeSide = function(){
            $('.layui-nav-side').css("top",$('#header').css("height"));
        }
    </script>
</body>
</html>